$OpenBSD: patch-lib_util_Makefile,v 1.4 2016/04/26 17:59:51 naddy Exp $
--- lib/util/Makefile.orig	Sat Sep 26 21:59:25 2015
+++ lib/util/Makefile	Mon Apr 25 19:43:02 2016
@@ -24,15 +24,20 @@ UTILOBJECTS = \
   token.o \
   vasprintf.o \
 
+SHUTILOBJECTS = $(patsubst %.o, %.lo, $(UTILOBJECTS))
+
 MERGE_OBJECTS =
 
 include $(SRCDIR)/common.mk
 
-all: $(UTILOBJECTS)
+all: $(UTILOBJECTS) $(SHUTILOBJECTS)
 
-$(UTILOBJECTS): CFLAGS_TARGET=$(CFLAGS_SHLIB)
+$(SHUTILOBJECTS): CFLAGS_TARGET=$(CFLAGS_SHLIB)
 
 $(UTILOBJECTS):%.o:%.c importinc
+	$(CC) -c $(INCLUDES) $(CFLAGS_ALL) -o $@ $<
+
+$(SHUTILOBJECTS):%.lo:%.c importinc
 	$(CC) -c $(INCLUDES) $(CFLAGS_ALL) -o $@ $<
 
 testnstring: test.c nstring.h nstring.o
